package javacommon.util;

import groovy.lang.Binding;
import groovy.lang.GroovyShell;

public class SumPriceUtils {

	public static void main(String[] args) {
		Binding binding = new Binding();
		binding.setVariable("a", 1);
		binding.setVariable("b", 5);
		//int a=0,b=0,c=0;
		
		GroovyShell shell = new GroovyShell(binding);
		Object ob= shell.evaluate("c = a-b;");
		Object result=(Object)binding.getVariable("c");
		System.out.println(result);
	}
}
